<!--
 * @FilePath: linechart.vue
 * @Author: 杜芬
 * @Date: 2021-10-18 10:51:24
 * @LastEditors: 
 * @LastEditTime: 2022-08-09 17:16:13
 * Copyright: 2022 xxxTech CO.,LTD. All Rights Reserved.
 * @Descripttion: 页面
-->
<template>
  <!-- echart -->
  <div id="main" class="linechart" style="width: 500px; height: 500px" />
</template>
<script>
export default {
  data() {
    return {
      property: 'value',
    };
  },
  mounted() {
    this.drawChart();
  },
  methods: {
    drawChart() {
      //   准备好DOM 初始化 echart 实例
      var myChart = this.$echarts.init(document.getElementById('main'));
      //   绘制图标
      myChart.setOption({
        title: {
          text: 'ECharts 入门示例',
        },
        tooltip: {},
        legend: {
          data: ['销量'],
        },
        xAxis: {
          data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'],
        },
        yAxis: {},
        series: [
          {
            name: '销量',
            type: 'bar',
            data: [5, 20, 36, 10, 10, 20],
          },
        ],
      });
    },
  },
};
</script>
